#pragma once
#include "ofMain.h"
#include "ofxXmlSettings.h"

class Amp {
public:
	Amp(float _val, float _time=0){startTime = _time; val = _val;};
	
	float startTime;
	float val;
};

class Cue {
public:
	enum Type {
		none,
		duskFile,
		random,
		accControl,
	};
	
	Cue(){
		startTime = 0;
		type = none;
		fadein = 0;
	};
	
	float startTime;
	int type;
	int layer;
	
	float fadein, fadeout;
	
	vector<int> affects;
	vector<Amp> amps;
	
	virtual void doStuff(float time,ofSoundPlayer * sound, int * duskValues){};
	float getCurrentAmp(float time);
	
};

class duskFileCue : public Cue {
public:
	bool loop;
	duskFileCue(float time,  int layer);
	ofxXmlSettings * file;
	string filePath;
	void doStuff(float time, ofSoundPlayer * sound, int * duskValues);
	
};

class accControlCue : public Cue {
public:
	bool dusk;
	bool audio;
	float * level;
	accControlCue(float time,  int layer);
	void doStuff(float time, ofSoundPlayer * sound, int * duskValues);
	bool * masterOn;
};


class randomCue : public Cue {
public:	
	randomCue(float time,  int layer);
	void doStuff(float time,ofSoundPlayer * sound, int * duskValues);
	bool soft;
	bool seldom;
	float speed;
	float frequency;
	float seldomrate;
	float p[64];
	
	
};

class noneCue : public Cue {
public:
	noneCue(float time, int layer);
	void doStuff(float time, ofSoundPlayer * sound, int * duskValues){};
};